/**
 * This class is used to create each of the property objects that can have assigned
 * to them IDs, location, name, production values and a mule. 
 * 
 * @author GT Five-O
 * @version v1.0b
 * 
 */

public class Property implements java.io.Serializable {

    protected String propertyName, locationofProperty;
    protected int[] production = new int[3];
    protected Mule worker;
    private int propertyID;
    private static int ID_COUNTER = 0;

    /**
     * Constructor that sets the property's ID value and increments the property
     * ID
     * 
     */
    public Property() {
        propertyID = ID_COUNTER;
        ID_COUNTER++;
    }

    /**
     * getter for the property ID
     * 
     * @return
     */
    public int getPropertyID() {
        return propertyID;
    }

    /**
     * sets the default mule for the land
     * 
     * @param m
     *            the mule being set as the default mule
     */
    public void emplaceMule(Mule m) {
        worker = m;
    }

    /**
     * getter for the food production for the land
     */
    public int getFoodInfo() {
        return production[0];
    }

    /**
     * getter for the energy production for the land
     */
    public int getEnergyInfo() {
        return production[1];
    }

    /**
     * getter for the ore production for the land
     */
    public int getOreInfo() {
        // TODO Auto-generated method stub
        return production[2];
    }

    /**
     * getter for the name type of the land
     */
    public String getName() {
        return propertyName;
    }

    /**
     * getter for the location of the land
     */
    public String getLocation() {
        return locationofProperty;
    }

    /**
     * setter for the location of the land
     * 
     * @param s
     *            the coordinates for the land
     */
    public void setLocation(String s) {
        locationofProperty = s;
    }

    /**
     * delete's the land's mule
     */
    public void removeMule() {
        worker = null;
    }

    /**
     * getter for the land's default mule
     */
    public Mule getMule() {
        return worker;
    }

    /**
     * checks whether or not the land has a mule assigned to it Returns false if
     * the worker variable has a null value If not, it returns true
     */
    public boolean hasMule() {
        if (worker == null)
            return false;
        return true;
    }

}
